﻿using AgencyManagerSystem.Model;
using Dapper;
using System;
using System.Collections.Generic;
using System.Text;

namespace AgencyManagerSystem.DataFetcher
{
    public class ERPDeliveryReportFetcher : ErpFetcher<ERPDeliveryReport>
    {
        public ERPDeliveryReportFetcher() : base()
        {

        }
        public override void AddDefaultFilter(StringBuilder stringBuilder, DynamicParameters dynamicParameters)
        {
            if (userProfile == null)
                return;
            //准备加入默认的过滤条件
            string keyStr = String.Format("@{0}_{1}", "CUSTOMERNO", COUNTER++);
            stringBuilder.AppendFormat(" AND CUSTOMERNO = {0} ", keyStr);
            dynamicParameters.Add(keyStr, userProfile.UserCode);
        }
    }
}